<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="ie-comp|ie-stand|webkit">
    <title><?php echo @$system_info->site_name;?> 办公系统</title>
    <link id="easyuiTheme" rel="stylesheet" type="text/css" href="<?php echo base_url().'data/themes/default/easyui.css';?>">
    <link rel="stylesheet" type="text/css" href="<?php echo base_url().'data/themes/icon.css';?>">
    <link rel="stylesheet" type="text/css" href="<?php echo base_url().'data/other/css/custom_icon.css';?>">
    <script type="text/javascript" src="<?php echo base_url().'data/jquery.min.js';?>"></script>
    <script type="text/javascript" src="<?php echo base_url().'data/jquery.easyui.min.js';?>"></script>
    <script type="text/javascript" src="<?php echo base_url().'data/locale/easyui-lang-zh_CN.js';?>"></script>
    <script>
	var date = new Date(); 
	var day_date = date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate();
	if(day_date != '<?php echo date('Y-n-j');?>'){
		alert('你的系统日期不正确，系统可能无法正常工作！\r\n今天应该是:'+'<?php echo date('Y年n月j日');?>');
	}
	
	$(function(){ 
		//回车提交 
		document.onkeydown = function(e){    
			var ev = document.all ? window.event : e;  
			if(ev.keyCode==13) {// 如（ev.ctrlKey && ev.keyCode==13）为ctrl+Center 触发  
				substrform();
			}  
		}  
	});
	
	//提交前验证表单
	function substrform(){
		var user_name_check = $("#username").textbox('getText');
		var user_password_check = $("#password").textbox('getText');
		if(user_name_check == ''){
			return $("[name='loginform']").form('enableValidation').form('validate');
		}else if(user_password_check == ''){
			return $("[name='loginform']").form('enableValidation').form('validate');
		}else{
			loginform.submit(); 
		}
	}
	</script>

	<style type="text/css">
    body {
        background: url(<?php echo base_url().'data/other/images/header.jpg';?>) no-repeat top fixed;
        background-size: 100%;
        width: 100%;
        height: 100%;
        font-size: 12px;
        overflow:hidden;
    }
    
    #login {
        background: url(<?php echo base_url().'data/other/images/login.jpg';?>) no-repeat;
        margin: 14% auto 0 auto;
        padding: 0;
        width: 900px;
        height:230px;
        position:relative;
		border:1px solid #95B8E7;
        -moz-border-radius: 8px 8px 8px 8px;
        -webkit-border-radius: 8px 8px 8px 8px;
        border-radius: 8px 8px 8px 8px;
        z-index:0;
    
    }
    #login_title {
		font-size:30px;
		color:#003366;
		font-family:"黑体";
        top:-70px;
        left:5px;
        padding: 0;
        width: 473px;
        height:124px;
        position:absolute;
        z-index:1px;
    }
    #login_form {
        top:-28px;
        right:50px;
        width: 350px;
        position:absolute;
		border:1px solid #95B8E7;
        z-index:1;
    }
    #login_bottom{
        bottom:-100px;
        width: 900px;
        height:1px;
        position:absolute;
        z-index:2px;
        background:#999;
        text-align:center;
        color:#999999;
    }
	
	/*隐藏提示的箭头*/  
	.tooltip .tooltip-arrow-outer,.tooltip .tooltip-arrow{display:none\9;}  
    </style>
    <!--[if IE 8]> 
    <style>
    #login {
        border:1px solid #999;
        behavior: url(<?php echo base_url().'data/ie-css3.htc';?>); 
    }
    
    #login_form {
        border:1px solid #999;
    }
    </style>
    <![endif]-->
</head>
<body>
    <div id="login">
        <!-- login -->
        <div id="login_title"><?php echo $this->settings_site->site_name;?></div>
        <div id="login_bottom">
            <span style="line-height:30px;">请使用IE9以上浏览器</span>
            <span style="line-height:30px;">&copy; 2014 远景软件 版权所有</span>
            <a style="margin-top:-3px;" href="javascript:void(0)" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-os-android'" onclick="$('#dlg').dialog('open')">客户端下载</a>
        </div>
        <div id="login_form">
            <div class="easyui-panel" border='false' title="系统登录" style="width:350px; padding:40px 50px 30px 50px;">
            <div id="info_message" style="height:20px; line-height:20px; margin:-30px auto 10px auto;"><?php echo $this->session->flashdata('error'); ?></div>
            <?php echo form_open('login/do',array('name'=>'loginform')); ?>
                <div style="margin-bottom:10px;">
                	<input id="username" name="username" class="easyui-textbox" value="<?php echo set_value('username'); ?>" style="width:100%;height:40px;padding:12px" data-options="required:true,prompt:'用户名',iconCls:'icon-man',iconWidth:38">
                </div>
                <div style="margin-bottom:20px">
                	<input id="password" name="password" class="easyui-textbox" type="password" style="width:100%;height:40px;padding:12px" data-options="required:true,prompt:'输入登录密码',iconCls:'icon-lock',iconWidth:38">
                </div>
                <div style="margin-bottom:20px"><?php echo form_checkbox('remember','1',true); ?><span style=" height:10px;"> 自动登录</span></div>
                <div><?php
                $data = array('onClick'=>'substrform()','class'=>'easyui-linkbutton','data-options'=>"iconCls:'icon-ok'",'content'=>'登录','style'=>'padding:5px 0px;width:250px;');
                echo form_button($data); ?>
                </div>
                <?php echo form_close();?>
            </div>
        </div>
        <div id="dlg" class="easyui-dialog" title="Android 客户端" data-options="iconCls:'icon-save',closed: true" style="width:410px;height:260px;padding:10px">
            <div style="float:left;"><img src="<?php echo base_url().'data/other/images/2014-09-17-1412011770.png';?>" width="200" height="200"></div>
            <div style="float:right; width:170px; padding:12px; position:absolute; right:5px;">扫描二维码 安装 Android 客户端<br><br>或 <a style=" margin-top:-3px;" href="<?php echo base_url().'mobile/login/android_ewm';?>" class="easyui-linkbutton" data-options="plain:true">下载</a> 到 PC<br><br>支持版本 Android 2.3 至 4.2</div>
        </div>
        <!-- end login -->
    </div>
</body>
</html>
